﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Print.aspx.cs" Inherits="BasicBase_SoldierArchive_Print"
    StylesheetTheme="Content" Title="士兵信息--输出EXCEL" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css" media="print">
        .Noprint
        {
            display: none;
        }
        .PageNext
        {
            page-break-after: always;
        }
        #gvSoldiers td
        {
            border: solid 1px #FFFFFF;
        }
    </style>
</head>
<body>
    <object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0"
        width="0">
    </object>
    <form id="form1" runat="server">
    <div>
        <ul class="topmenu">
            <li>
                <asp:LinkButton runat="server" ID="lkbExcel" OnClick="lkbExcel_Click">导出</asp:LinkButton></li>
        </ul>
        <div id="printpage" style="background-color: #FFF; padding: 0">
            <asp:GridView ID="gvSoldiers" runat="server" AutoGenerateColumns="False" Caption="<span>士兵详细信息</span>"
                DataKeyNames="SoldierID,DepartmentID" Width="100%" OnRowDataBound="gvSoldiers_RowDataBound"
                BorderColor="#cccccc" GridLines="Both" BorderWidth="1">
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemTemplate>
                            <asp:Label ID="ID" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="SoldierName" HeaderText="姓名" />
                    <asp:BoundField DataField="Sex" HeaderText="性别" />
                    <asp:TemplateField HeaderText="部门">
                        <ItemTemplate>
                            <%# GetDepartment(Eval("DepartmentID"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="警衔">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Rank"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入伍时间">
                        <ItemTemplate>
                            <%# GetDateTime(Eval("JoinTime"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入伍所有地">
                        <ItemTemplate>
                            <%# Eval("JoinPlace")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:GridView>
        </div>
        <asp:Label runat="server" ID="lblWhere" Visible="false"></asp:Label>
    </div>
    </form>
</body>
</html>
